package disk;

/**
 * 已打开文件列表项
 * 
 * @author vincent
 * 
 */
public class OpenFileTableItem {
	/**
	 * 文件路径名
	 */
	private String filePath;
	/**
	 * 文件属性
	 */
	private byte fileType;
	/**
	 * 起始盘块号
	 */
	private int blockIndex;
	/**
	 * 文件长度
	 */
	private int fileLength;
	/**
	 * 操作类型(0表示读方式打开文件 1表示写方式打开文件)
	 */
	private int operationType;
	/**
	 * 读指针
	 */
	private int readIndex;
	/**
	 * 写指针
	 */
	private int writeIndex;

	/**
	 * 构造函数
	 */
	public OpenFileTableItem(String filePath, byte fileType, int blockIndex,
			int fileLength, int operationType, int readIndex, int writeIndex) {
		this.filePath = filePath;
		this.fileType = fileType;
		this.blockIndex = blockIndex;
		this.fileLength = fileLength;
		this.operationType = operationType;
		this.readIndex = readIndex;
		this.writeIndex = writeIndex;
	}

	public OpenFileTableItem() {

	}

	public int getBlockIndex() {
		return blockIndex;
	}

	public int getFileLength() {
		return fileLength;
	}

	public String getFilePath() {
		return filePath;
	}

	public byte getFileType() {
		return fileType;
	}

	public int getOperationType() {
		return operationType;
	}

	public int getReadIndex() {
		return readIndex;
	}

	public int getWriteIndex() {
		return writeIndex;
	}

	public void setBlockIndex(int blockIndex) {
		this.blockIndex = blockIndex;
	}

	public void setFileLength(int fileLength) {
		this.fileLength = fileLength;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public void setFileType(byte fileType) {
		this.fileType = fileType;
	}

	public void setOperationType(int operationType) {
		this.operationType = operationType;
	}

	public void setReadIndex(int readIndex) {
		this.readIndex = readIndex;
	}

	public void setWriteIndex(int writeIndex) {
		this.writeIndex = writeIndex;
	}
}
